package com.sc.VenusQueryBeta.model.account.zhuanma;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.zhuanma.ZhuanMa02Contract;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.zhuanma.ZhuanMaList2;

import io.reactivex.Observable;

/**
 * Created by Administrator on 19/10/2018.
 *
 */

public class Zhuanma02Model extends BaseModel implements ZhuanMa02Contract.IZhuanMa02Model {

    public static Zhuanma02Model newInstance() {
        return new Zhuanma02Model();
    }

    @Override
    public Observable<CurrencyListBean> queryCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());
    }

    @Override
    public Observable<ZhuanMaList2> getZhuanma2(String serverAddress, String projectName, int serverPort, int clientindex, int start, int limit, String clientAppmsgnum, String roomonth, String roomyear, int roomid,String currencynameCN) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                queryZhuanma02(roomonth,roomyear,start,limit,clientindex,clientAppmsgnum,roomid,currencynameCN).compose(RxHelper.<ZhuanMaList2>rxSchedulerHelper());
    }
}
